package Requests

import "time"

type NoteParams struct {
	Basic
	EducationalBackData []EducationalBackData `json:"educational_back" form:"educational_back"`
	WorkExp             []struct {
		Key          string      `json:"key" form:"key"`
		BusinessName string      `json:"business_name" form:"business_name"  binding:"string"`
		Salary       string      `json:"salary" form:"salary"  binding:"string"`
		PositionName string      `json:"position_name" form:"position_name"  binding:"string"`
		WorkExp      string      `json:"work_exp" form:"work_exp"  binding:"string"`
		WorkDateSt   int64       `json:"work_date_st" form:"work_date_st"  binding:"int64"`
		WorkDateEd   int64       `json:"work_date_ed" form:"work_date_ed"  binding:"int64"`
		WorkTime     []time.Time `json:"workTime" form:"workTime"`
	} `json:"work_exp" form:"work_exp"`
	NotesIntention []struct {
		Key                string `json:"key" form:"key"`
		PositionCategoryId int    `json:"position_category_id" form:"position_category_id"  binding:"int"`
		JobType            int    `json:"job_type" form:"job_type"  binding:"int"`
		Salary1            string `json:"salary1" form:"salary1"  binding:"string"`
		Salary2            string `json:"salary2" form:"salary2"  binding:"string"`
		WorkCity           int    `json:"work_city" form:"work_city"  binding:"int"`
		WorkProvince       int    `json:"work_province" form:"work_province"  binding:"int"`
		IntentionCity      struct {
			City     int `json:"city" form:"city"`
			Province int `json:"province" form:"province"`
		} `json:"intentionCity" form:"intentionCity"`
		IntentionSalary struct {
			Salary1 string `json:"salary1" form:"salary1"`
			Salary2 string `json:"salary2" form:"salary2"`
		} `json:"intentionSalary" form:"intentionSalary"`
	} `json:"notes_intention" form:"notes_intention"`
	ProjectExp []struct {
		BusinessName string      `json:"business_name" form:"business_name"  binding:"string"`
		PositionName string      `json:"position_name" form:"position_name"  binding:"string"`
		WorkName     string      `json:"work_name" form:"work_name"  binding:"string"`
		WorkExp      string      `json:"work_exp" form:"work_exp"  binding:"string"`
		Key          string      `json:"key" form:"key"`
		WorkDateSt   int64       `json:"work_date_st" form:"work_date_st"  binding:"int64"`
		WorkDateEd   int64       `json:"work_date_ed" form:"work_date_ed"  binding:"int64"`
		WorkTime     []time.Time `json:"workTime" form:"workTime"`
	} `json:"project_exp" form:"project_exp"`
}

type EducationalBackData struct {
	ID             int    `gorm:"primaryKey;autoIncrement"`
	JobNotesId     int    `json:"job_notes_id" `
	Mobile         string `json:"mobile" form:"mobile"  binding:"string"`
	Speciality     string `json:"speciality" form:"speciality"  binding:"string"`
	Education      int    `json:"education" form:"education"  binding:"int"`
	UniversityName string `json:"university_name" form:"university_name"  binding:"string"`
	StDateSt       int64  `json:"st_date_st" form:"st_date_st"  binding:"int64"`
	StDateEd       int64  `json:"st_date_ed" form:"st_date_ed"  binding:"int64"`
	EducateTime    int64  `json:"educateTime" form:"educateTime"`
	CreatedAt      int64  `gorm:"column:created_at" json:"created_at"`
}

type Basic struct {
	Id        int    `json:"id" form:"id"  binding:"int"`
	UserName  string `json:"user_name" form:"user_name"  binding:"required|string|max:20"`
	WorkSt    int    `json:"work_st" form:"work_st"  binding:"required|int"`
	Email     string `json:"email" form:"email"  binding:"string"`
	Birth     int64  `json:"birth" form:"birth"  binding:"int64"`
	WorkDate  int64  `json:"work_date" form:"work_date"  binding:"int64"`
	WeChat    string `json:"weChat" form:"weChat"  binding:"string"`
	Sex       int    `json:"sex" form:"sex"  binding:"int"`
	Mobile    string `json:"mobile" form:"mobile"  binding:"string"`
	Adv       string `json:"adv" form:"adv"  binding:"string"`
	CreatedAt int64  `gorm:"column:created_at" json:"created_at"`
}

type NoteInsertData struct {
	ID         uint `gorm:"primaryKey;autoIncrement"`
	UserName   string
	WorkSt     int
	Email      string
	Birth      int64
	WorkDate   int64
	WeChat     string `gorm:"column:weChat" json:"weChat"`
	CreatedAt  int64  `gorm:"column:created_at" json:"created_at"`
	Sex        int
	CellMobile string
	Mobile     string
	Adv        string
}

type NotesIntentionData struct {
	ID                 int    `gorm:"primaryKey;autoIncrement"`
	Mobile             string `json:"mobile" `
	PositionCategoryId int    `json:"position_category_id" `
	JobType            int    `json:"job_type" `
	JobNotesId         int    `json:"job_notes_id" `
	Education          string `json:"education" `
	Salary1            string `json:"salary1" `
	Salary2            string `json:"salary2" `
	WorkYear           int64  `json:"work_year" `
	WorkProvince       int    `json:"work_province" `
	WorkCity           int    `json:"work_city" `
	Status             int    `json:"status" `
	CreatedAt          int64  `gorm:"column:created_at" json:"created_at"`
}

type TP int

const (
	PROJECT TP = 2
	WORK    TP = 1
)

type ProjectExpData struct {
	ID           int    `json:"id" gorm:"primaryKey;autoIncrement"`
	JobNotesId   int    `json:"job_notes_id" `
	BusinessName string `json:"business_name" form:"business_name"`
	PositionName string `json:"position_name" form:"position_name"`
	WorkName     string `json:"work_name" form:"work_name"`
	WorkExp      string `json:"work_exp" form:"work_exp"`
	WorkDateSt   int64  `json:"work_date_st" form:"work_date_st"`
	WorkDateEd   int64  `json:"work_date_ed" form:"work_date_ed"`
	Salary       string `json:"salary" form:"salary"`
	Tp           TP     `json:"tp" form:"tp"`
	Mobile       string `json:"mobile"`
	CreatedAt    int64  `json:"created_at" gorm:"column:created_at"`
}

type WorkExpData struct {
	ID           int    `gorm:"primaryKey;autoIncrement"`
	JobNotesId   int    `json:"job_notes_id" `
	BusinessName string `json:"business_name" form:"business_name"`
	Salary       string `json:"salary" form:"salary"`
	Tp           TP     `json:"tp" form:"tp"`
	Mobile       string `json:"mobile" `
	PositionName string `json:"position_name" form:"position_name"`
	WorkExp      string `json:"work_exp" form:"work_exp"`
	WorkDateSt   int64  `json:"work_date_st" form:"work_date_st"`
	WorkDateEd   int64  `json:"work_date_ed" form:"work_date_ed"`
	CreatedAt    int64  `gorm:"column:created_at"`
}
